package czopyk.model.analysis.conditions;

import czopyk.model.request.LoadClass;

public class ResponseTimeStatCondition extends Condition {

	public final StatsType statsType;
	public final LoadClass lc;

	public ResponseTimeStatCondition(double windowSize, WindowType windowType,
			StatsType statsType, LoadClass lc) {
		super(windowSize, windowType);
		
		if (statsType == null) {
			throw new IllegalArgumentException("Stats type cannot be null.");
		}
		this.statsType = statsType;
		this.lc = lc;

		if (statsType.equals(StatsType.THROUGHPUT)
				&& !WindowType.MODEL_TIME.equals(windowType)) {
			throw new IllegalArgumentException("Stats type '" + statsType.toString()
					+ "' can be combined with window type 'MODEL_TIME' only.");
		}
	}

}
